import React from 'react'
import { useLocation } from 'react-router-dom'
import qs from 'qs';

export default function News() {
  const location = useLocation()
  console.log(location);
  const {user,id}=qs.parse(location.search.split('?')[1])
  console.log(user,id);
  return (
    <div>News
      <br />
      <p>用户名是{user} 编号是:{id}</p>
    </div>
  )
}
